package com.zkthink.ceres.msgs.service.impl;

import com.baomidou.mybatisplus.extension.api.R;
import com.zkthink.ceres.msgs.config.PushConfig;
import com.zkthink.ceres.msgs.dto.MobilePushDTO;
import com.zkthink.ceres.msgs.service.MobilePushService;
import com.zkthink.ceres.msgs.utils.MobilePushUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * FileName: MobilePushServiceImpl
 * Author:   Pepis
 * Date:   2020  2020/8/31 10:23
 * Description: 移动推送实现类
 **/
@Service
@Slf4j
public class MobilePushServiceImpl  implements MobilePushService {

    //消息推送配置
    @Autowired
    private MobilePushUtil mobilePushUtil;

    /**
     * 推送消息 给某个用户 /某些用户
     *
     * @param mobilePushDTO
     * @return
     */
    @Override
    public String pushMsg(MobilePushDTO mobilePushDTO) {
        return mobilePushUtil.pushMsg(mobilePushDTO);
    }

    /**
     * 全量推送,给所有用户推送
     * @param mobilePushDTO
     * @return
     */
    @Override
    public String pushMsgAll(MobilePushDTO mobilePushDTO) {
        return mobilePushUtil.pushMsgAll(mobilePushDTO);
    }
}
